﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="News.aspx.cs" Inherits="News" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>

    <script src="js/jquery.bxSlider.min.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="tab">
        <div class="ac-tab">
            <span><asp:Label runat="server" ID="lbpageName"></asp:Label></span></div>
    </div>
    <div class="news">
        <div class="top-news" style="padding-left: 8px;">
            <div class="bt-news">
                <div class="big-news">
                    <asp:Repeater ID="rptAnhLon" runat="server">
                        <ItemTemplate>
                            <div class="yom-mod story">
                                <div class="hd">
                                    <div class="media">
                                        <a href="NewsDetail.aspx?id=<%# Eval("Id") %>&lang=<%= lang.ToString() %>">
                                            <img src="images/<%# Eval("HinhAnh") %>" width="640px" height="422px" alt="" title="<%# Eval("MoTa") %>"></a></div>
                                </div>
                                <div class="bd">
                                    <div class="panel">
                                        <h2>
                                            <a href="NewsDetail.aspx?id=<%# Eval("Id") %>&lang=<%= lang.ToString() %>">
                                                <%# Eval("Ten") %></a></h2>
                                        <p>
                                            <%# Eval("MoTa") %></p>
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div class="thump">
                    <asp:Repeater runat="server" ID="rptAnhNho">
                        <ItemTemplate>
                            <div class="thpitem">
                                <div class="thpimg">
                                    <a>
                                        <img src="images/<%# Eval("HinhAnh") %>" width="120px" height="76px" alt="" title="<%# Eval("MoTa") %>"></a>
                                </div>
                                <div class="thpright">
                                    <div>
                                        <a href="NewsDetail.aspx?id=<%# Eval("Id") %>&lang=<%= lang.ToString() %>">
                                            <h4>
                                                <%# Eval("Ten") %></h4>
                                        </a>
                                    </div>
                                    <div>
                                        <%# CommonHelper.RutGonStringVer2(Eval("Mota").ToString(),70) %></div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(function() {
            // assign the slider to a variable
            var slider = $('.big-news').bxSlider({
		auto:15000,
                speed:1000,
                controls: false,
randomStart: true,
            })
            slider.goToSlide(0);

            // assign a click event to the external thumbnails
            $('.thump .thpitem .thpimg').click(function() {
            var thumbIndex = $('.thump .thpitem .thpimg').index(this);
                // call the "goToSlide" public function
                slider.goToSlide(thumbIndex);

                // remove all active classes
                $('.thump .thpitem .thpimg').removeClass('pager');
                // assisgn "pager-active" to clicked thumb
                $(this).addClass('pager');
                // very important! you must kill the links default behavior
                return false;
            });
        });
    </script>

</asp:Content>
